import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

import '../res/r.dart';

class LoadingView extends StatelessWidget {
  const LoadingView({super.key, this.title = '加载中'});
  final String title;
  @override
  Widget build(BuildContext context) {
    return Container(
      color: const Color.fromRGBO(245, 245, 245, 1),
      child: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            Image.asset(ImagePath.assetsLoadingView),
            SizedBox(height: 25.w),
            Text(title,
                style: const TextStyle(
                    color: Color.fromRGBO(104, 106, 111, 1), fontSize: 14))
          ],
        ),
      ),
    );
  }
}
//loading_view